package com.sun.dailyprj.androidx.viewmodel.model;

import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

import com.sun.dailyprj.androidx.viewmodel.bean.Person;

/*
 * =====================================================================================
 * Summary:
 *
 * File: NameViewModel.java
 * Author: Yanpeng.Sun
 * Create: 2019/11/25 10:39
 * =====================================================================================
 */
public class NameViewModel extends ViewModel{

    private MutableLiveData<Person> mMutableLiveDataPersion;

    public MutableLiveData<Person> getCurrentName() {
        if(mMutableLiveDataPersion == null) {
            synchronized(this) {
                if(mMutableLiveDataPersion == null) {
                    mMutableLiveDataPersion = new MutableLiveData<>();
                }
            }
        }
        return mMutableLiveDataPersion;
    }



}
